<style type="text/css">
#myform .form-group{margin-bottom: 10px;}
#myform .form-group:after {clear: both; content: " "; display: table; }
#myform .form-form-label{float: left;width: 20%;}
#myform .form-input{float: right;width: 80%;}
</style>
<form name="myform" id="myform" action="{:url('index/post')}" method="post" class="J_ajaxForms" enctype="multipart/form-data">
    {if condition="is_array($forminfos)"}
    {foreach name="forminfos" item="info"}
    {php}if($info['isomnipotent']) continue;{/php}
    <div class="form-group">
        <label class="form-label">{if $info['star']}<i class="required">*</i>{/if}{$info['name']}</label>
        <div class="form-input">
            {$info['form']}
            <span id="form-err-message"></span>
            <p class="form-tips">{$info['tips']}</p>
        </div>
    </div>
    {/foreach}
    {/if}
    {eq name="setting['isverify']" value="1"}
    <div class="form-group">
    <label class="form-label">验证码</label>
    <div class="form-input verifycode">
        <input type="text" name="verify" id="verify" value="" class="input">&nbsp;
        <img src="{:url('api/Checkcode/getVerify','type=formguide&length=4&font_size=14&imageW=100&imageH=33&font_color=&background=')}" name="codeimage" id="codeimage" border="0"/></div>
    </div>
    {/eq}
    <div class="form-submit">
        <input type="hidden" name="formid" value="{$formid}"/>
        <input type="submit" name="dosubmit" id="dosubmit" value=" 提交 ">
    </div>
</form>
<script>
$(function(){
    $('#codeimage').click(function(){
        var num = new Date().getTime();
        var rand = Math.round(Math.random() * 10000);
        var num = num + rand;
        $("#codeimage").attr('src', $("#codeimage").attr('src') + "&t=" + num);
    });
});
</script>